package com.atguigu.aiproject.service;

import com.atguigu.aiproject.dto.CreationQueryDTO;
import com.atguigu.aiproject.dto.PublishPostDTO;
import com.atguigu.aiproject.dto.PublishRequestDTO;
import com.atguigu.aiproject.entity.Creation;
import com.atguigu.aiproject.vo.CreationCoverVO;
import com.atguigu.aiproject.vo.CreationDetailsVO;
import com.atguigu.aiproject.vo.PageResult;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;


public interface CreationService extends IService<Creation> {

    IPage<CreationCoverVO> searchCreationBySql(int pageNum, int pageSize, String sql);
    CreationDetailsVO getDetails(Integer id);
    IPage<CreationCoverVO> getCreationCoverVOListByUserId(int pageNum, int pageSize, int userId);
    IPage<CreationCoverVO> getCreationCoverVOList(int pageNum, int pageSize, CreationQueryDTO queryDTO);
    void publishToQueue(PublishRequestDTO publishRequestDTO, MultipartFile pic) throws IOException;
    PageResult<CreationCoverVO> searchCreation(int pageNum, int pageSize, String searchPrompt);
    PageResult<CreationCoverVO> searchCreationByUUid(int pageNum, int pageSize, String searchId);
    Integer saveCreation(PublishPostDTO publishPostDTO,Boolean isApproved) throws IOException;
}
